﻿<UserControl
    x:Class="Srk.BetaseriesApiApp.Views.ShowInfo"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    mc:Ignorable="d" 
    xmlns:ctrls="clr-namespace:Srk.BetaseriesApiApp.Controls"
    d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ctrls:ShowControl DataContext="{Binding Show}"
                                       Grid.Row="0" Margin="4" />

        <ListView Grid.Row="2" Margin="4" x:Name="lvEpisodes"
                              ItemsSource="{Binding Show.Episodes}"
                              ScrollViewer.CanContentScroll="True"
                              ItemContainerStyle="{StaticResource EpisodeListViewItemStyle}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Number" DisplayMemberBinding="{Binding Number}" />
                    <GridViewColumn Header="S" DisplayMemberBinding="{Binding SeasonOrder}" />
                    <GridViewColumn Header="E" DisplayMemberBinding="{Binding Order}" />
                    <GridViewColumn Header="Date" DisplayMemberBinding="{Binding Date}" />
                    <GridViewColumn Header="Rating" DisplayMemberBinding="{Binding Rating}" />
                    <GridViewColumn Header="Title" DisplayMemberBinding="{Binding Title}" />
                    <GridViewColumn Header="Seen" DisplayMemberBinding="{Binding IsSeen}" />
                    <GridViewColumn Header="Downloaded" DisplayMemberBinding="{Binding IsDownloaded}" />
                </GridView>
            </ListView.View>
            <ListView.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Comments" x:Name="episodeMenu_Comments" Click="episodeMenu_Comments_Click" />
                </ContextMenu>
            </ListView.ContextMenu>
        </ListView>

        <TextBlock Grid.Row="3" Text="{Binding StatusMessage}" Margin="4" />
    </Grid>
</UserControl>
